<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\agent\controller;

class PermissionContrller extends \app\AgentRest
{
    public function __construct(\think\App $app)
    {
        parent::__construct($app);
        if($this->_user["role_name"] != "admin") {
            echo json_encode(["code" => 401, "error" => lang("Permission denied")]);
            exit;
        }
    }
    public function getAgentPermission()
    {
        $is_super_admin = $this->_role == "admin" ? true : false;
        if(!$is_super_admin) {
            return $this->error("非法请求， 请联系超级管理员");
        }
        $is_we7 = defined("IS_WEIQIN");
        $permissionArticle = new \app\article\info\PermissionArticle(0);
        $permissionBoss = new \app\boss\info\PermissionBoss(0);
        $permissionBaidu = new \app\baidu\info\PermissionBaidu(0);
        $permissionClosure = new \app\closure\info\PermissionClosure(0);
        $permissionPassenger = new \app\passenger\info\PermissionPassenger(0);
        $permissionRedbag = new \app\redbag\info\PermissionRedbag(0);
        $permissionReduction = new \app\reduction\info\PermissionReduction(0);
        $permissionLivevideo = new \app\livevideo\info\PermissionLivevideo(0);
        $permissionShortvideo = new \app\shortvideo\info\PermissionShortvideo(0);
        $permissionMember = new \app\member\info\PermissionMember(0);
        $permissionRestaurant = new \app\restaurant\info\PermissionRestaurant(0);
        $permissionOverlord = new \app\overlord\info\PermissionOverlord(0);
        $permissionPayclass = new \app\payclass\info\PermissionPayclass(0);
        $permissionBargain = new \app\bargain\info\PermissionBargain(0);
        $permissionQuestion = new \app\question\info\PermissionQuestion(0);
        $has_article = $permissionArticle->sAuth();
        $has_boss = $permissionBoss->sAuth();
        if($has_boss) {
            $has_boss = 0 < $permissionBoss->getSaasValue() ? true : false;
        }
        $has_baidu = $permissionBaidu->sAuth();
        $has_closure = $permissionClosure->sAuth();
        $has_passenger = $permissionPassenger->sAuth();
        $has_redbag = $permissionRedbag->sAuth();
        $has_reduction = $permissionReduction->sAuth();
        $has_livevideo = $permissionLivevideo->sAuth();
        $has_shortvideo = $permissionShortvideo->sAuth();
        $has_member = $permissionMember->sAuth();
        $has_restaurant = $permissionRestaurant->sAuth();
        $has_overlord = $permissionOverlord->sAuth();
        $has_payclass = $permissionPayclass->sAuth();
        $permissionHouse = new \app\house\info\PermissionHouse(0);
        $has_house = $permissionHouse->sAuth();
        $permissionActivity = new \app\activity\info\PermissionActivity(0);
        $has_activity = $permissionActivity->sAuth();
        $has_bargain = $permissionBargain->sAuth();
        $has_question = $permissionQuestion->sAuth();
        if(APP_MODEL_NAME == "longbing_restaurant") {
            $has_restaurant = false;
        }
        if(APP_MODEL_NAME == "longbing_shortvideo") {
            $has_shortvideo = false;
        }
        if(APP_MODEL_NAME == "longbing_member") {
            $has_member = false;
        }
        if(APP_MODEL_NAME == "longbing_house") {
            $has_house = false;
        }
        if(APP_MODEL_NAME == "longbing_liveshop") {
            $has_livevideo = false;
        }
        $all_meta_json = "\n[\n    {\n        \"path\":\"/\",\n        \"name\":\"Auth\",\n        \"component\":\"Layout\",\n        \"hidden\":false,\n        \"redirect\":\"/auth\",\n        \"meta\":{\n            \"menuName\":\"AuthManage\",\n            \"icon\":\"iconauthorise\"\n        },\n        \"children\":[\n            {\n                \"path\":\"auth\",\n                \"name\":\"AuthManage\",\n                \"component\":\"/auth\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"AuthManage\",\n                    \"icon\":\"iconauthorise\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            },\n            {\n                \"path\":\"editAuth\",\n                \"name\":\"EditAuth\",\n                \"component\":\"/editAuth\",\n                \"hidden\":true,\n                \"meta\":{\n                    \"keepAlive\":false,\n                    \"menuName\":\"EditAuth\",\n                    \"icon\":\"\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\": \"/\",\n        \"name\": \"AgentLevel\",\n        \"component\": \"Layout\",\n        \"hidden\": false,\n        \"redirect\": \"/agentLevel\",\n        \"meta\": {\n            \"menuName\": \"AgentLevelManage\",\n            \"icon\": \"iconAgentLevel\"\n        },\n        \"children\": [\n            {\n                \"path\": \"agentLevel\",\n                \"name\": \"AgentLevelManage\",\n                \"component\": \"/agentLevel\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"AgentLevelManage\",\n                    \"icon\": \"iconAgentLevel\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            },\n            {\n                \"path\": \"editAgentLevel\",\n                \"name\": \"EditAgentLevel\",\n                \"component\": \"/editAgentLevel\",\n                \"hidden\": true,\n                \"meta\": {\n                    \"keepAlive\": false,\n                    \"menuName\": \"EditAgentLevel\",\n                    \"icon\": \"\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\": \"/\",\n        \"name\": \"AgentAuth\",\n        \"component\": \"Layout\",\n        \"hidden\": false,\n        \"redirect\": \"/agentAuth\",\n        \"meta\": {\n            \"menuName\": \"AgentAuthManage\",\n            \"icon\": \"iconagentauth\"\n        },\n        \"children\": [\n            {\n                \"path\": \"agentAuth\",\n                \"name\": \"AgentAuthManage\",\n                \"component\": \"/agentAuth\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"AgentAuthManage\",\n                    \"icon\": \"iconagentauth\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            },\n            {\n                \"path\": \"editAgentAuth\",\n                \"name\": \"EditAgentAuth\",\n                \"component\": \"/editAgentAuth\",\n                \"hidden\": true,\n                \"meta\": {\n                    \"keepAlive\": false,\n                    \"menuName\": \"EditAgentAuth\",\n                    \"icon\": \"\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/copyright\",\n        \"name\":\"Copyright\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/copyright/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"CopyrightManage\",\n            \"icon\":\"iconbanquan\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"CopyrightIndex\",\n                \"component\":\"/copyright\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"CopyrightManage\",\n                    \"icon\":\"iconbanquan\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            },\n            {\n                \"path\":\"edit\",\n                \"name\":\"EditCopyright\",\n                \"component\":\"/editCopyright\",\n                \"hidden\":true,\n                \"meta\":{\n                    \"keepAlive\":false,\n                    \"menuName\":\"EditCopyright\",\n                    \"icon\":\"\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    }\n    ,\n    {\n        \"path\": \"/\",\n        \"name\": \"Upload\",\n        \"component\": \"Layout\",\n        \"hidden\": false,\n        \"redirect\": \"/upload\",\n        \"meta\": {\n            \"menuName\": \"UploadManage\",\n            \"icon\": \"iconuploadset\"\n        },\n        \"children\": [\n            {\n                \"path\": \"upload\",\n                \"name\": \"UploadManage\",\n                \"component\": \"/upload\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"UploadManage\",\n                    \"icon\": \"iconuploadset\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            },\n            {\n                \"path\": \"editUpload\",\n                \"name\": \"EditUpload\",\n                \"component\": \"/editUpload\",\n                \"hidden\": true,\n                \"meta\": {\n                    \"keepAlive\": false,\n                    \"menuName\": \"EditUpload\",\n                    \"icon\": \"\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/default\",\n        \"name\":\"Default\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/default/setting\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"DefaultSetting\",\n            \"icon\":\"iconshezhi\"\n        },\n        \"children\":[\n            {\n                \"path\":\"setting\",\n                \"name\":\"DefaultSetting\",\n                \"component\":\"/default\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":false,\n                    \"menuName\":\"DefaultSetting\",\n                    \"icon\":\"iconshezhi\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/chat\",\n        \"name\":\"Chat\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/chat/record\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"ChatRecord\",\n            \"icon\":\"iconliaotian\"\n        },\n        \"children\":[\n            {\n                \"path\":\"record\",\n                \"name\":\"ChatRecord\",\n                \"component\":\"/chatRecord\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"ChatRecord\",\n                    \"icon\":\"iconliaotian\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/article\",\n        \"name\":\"Article\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/article/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Article\",\n            \"icon\":\"iconwenzhangguanli\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"ArticleIndex\",\n                \"component\":\"/article\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"Article\",\n                    \"icon\":\"iconwenzhangguanli\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/activity\",\n        \"name\":\"Activity\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/activity/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Activity\",\n            \"icon\":\"iconhuodongyingxiao\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"ActivityIndex\",\n                \"component\":\"/activity\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"Activity\",\n                    \"icon\":\"iconhuodongyingxiao\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/house\",\n        \"name\":\"House\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/house/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"House\",\n            \"icon\":\"iconfangchan01\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"HouseIndex\",\n                \"component\":\"/house\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"House\",\n                    \"icon\":\"iconfangchan01\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/baidu\",\n        \"name\":\"Baidu\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/baidu/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Baidu\",\n            \"icon\":\"iconicon_baidulogo\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"BaiduIndex\",\n                \"component\":\"/baidu\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\": true,\n                    \"menuName\":\"Baidu\",\n                    \"icon\":\"iconicon_baidulogo\",\n                    \"url\": \"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\": \"/closure\",\n        \"name\": \"Closure\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/closure/index\",\n        \"hidden\":false,\n        \"meta\": {\n            \"menuName\": \"Closure\",\n            \"icon\": \"icon_closure\"\n        },\n        \"children\": [\n            {\n                \"path\": \"index\",\n                \"name\": \"ClosureIndex\",\n                \"component\": \"/closure\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"Closure\",\n                    \"icon\": \"icon_closure\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }]\n    },\n    {\n        \"path\": \"/passenger\",\n        \"name\": \"Passenger\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/passenger/index\",\n        \"hidden\": false,\n        \"meta\": {\n            \"menuName\": \"Passenger\",\n            \"icon\": \"icon_passenger\"\n        },\n        \"children\": [\n            {\n                \"path\": \"index\",\n                \"name\": \"PassengerIndex\",\n                \"component\": \"/passenger\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"Passenger\",\n                    \"icon\": \"icon_passenger\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }]\n    },\n    {\n        \"path\": \"/cash\",\n        \"name\": \"Cash\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/cash/index\",\n        \"hidden\": false,\n        \"meta\": {\n            \"menuName\": \"Cash\",\n            \"icon\": \"iconxinkefuli\"\n        },\n        \"children\": [\n            {\n                \"path\": \"index\",\n                \"name\": \"CashIndex\",\n                \"component\": \"/cash\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"Cash\",\n                    \"icon\": \"iconxinkefuli\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }]\n    }\n    ,\n    {\n        \"path\": \"/reduction\",\n        \"name\": \"Reduction\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/reduction/index\",\n        \"hidden\": false,\n        \"meta\": {\n            \"menuName\": \"Reduction\",\n            \"icon\": \"iconreduction\"\n        },\n        \"children\": [\n            {\n                \"path\": \"index\",\n                \"name\": \"ReductionIndex\",\n                \"component\": \"/reduction\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"Reduction\",\n                    \"icon\": \"iconreduction\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }]\n    },\n    {\n        \"path\": \"/live\",\n        \"name\": \"Live\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/live/index\",\n        \"hidden\": false,\n        \"meta\": {\n            \"menuName\": \"Live\",\n            \"icon\": \"iconlive\"\n        },\n        \"children\": [\n            {\n                \"path\": \"index\",\n                \"name\": \"LiveIndex\",\n                \"component\": \"/live\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"Live\",\n                    \"icon\": \"iconlive\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }]\n    },\n    {\n        \"path\": \"/shortvideo\",\n        \"name\": \"Shortvideo\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/shortvideo/index\",\n        \"hidden\": false,\n        \"meta\": {\n            \"menuName\": \"Shortvideo\",\n            \"icon\": \"iconShortVideo\"\n        },\n        \"children\": [\n            {\n                \"path\": \"index\",\n                \"name\": \"ShortvideoIndex\",\n                \"component\": \"/shortvideo\",\n                \"hidden\": false,\n                \"meta\": {\n                    \"keepAlive\": true,\n                    \"menuName\": \"Shortvideo\",\n                    \"icon\": \"iconShortVideo\",\n                    \"url\": \"\",\n                    \"pagePermission\": [\n                    ]\n                }\n            }]\n    },\n    {\n        \"path\":\"/company\",\n        \"name\":\"Company\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/company/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Company\",\n            \"icon\":\"icongongsikehuguanli\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"CompanyIndex\",\n                \"component\":\"/company\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"Company\",\n                    \"icon\":\"icongongsikehuguanli\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/vip\",\n        \"name\":\"Member\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/member/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Member\",\n            \"icon\":\"iconreduction\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"MemberIndex\",\n                \"component\":\"/member\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"Member\",\n                    \"icon\":\"iconMember\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }]\n    },\n    {\n        \"path\":\"/restaurant\",\n        \"name\":\"Restaurant\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/restaurant/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Restaurant\",\n            \"icon\":\"iconcanyin1\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"RestaurantIndex\",\n                \"component\":\"/restaurant\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"Restaurant\",\n                    \"icon\":\"iconcanyin1\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }]\n    },\n    {\n        \"path\": \"/overlord\",\n        \"name\": \"Overlord\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/overlord/index\",\n        \"hidden\": false,\n        \"meta\": {\n            \"menuName\": \"Overlord\",\n            \"icon\": \"iconhuodongyingxiao\"\n        },\n        \"children\": [{\n            \"path\": \"index\",\n            \"name\": \"OverlordIndex\",\n            \"component\": \"/overlord\",\n            \"hidden\": false,\n            \"meta\": {\n                \"keepAlive\": true,\n                \"menuName\": \"Overlord\",\n                \"icon\": \"iconhuodongyingxiao\",\n                \"url\": \"\",\n                \"pagePermission\": []\n            }\n        }]\n    }\n    ,\n    {\n         \"path\": \"/bargain\",\n         \"name\": \"Bargain\",\n         \"component\": \"Layout\",\n         \"redirect\": \"/bargain/index\",\n         \"hidden\": false,\n         \"meta\": {\n          \"menuName\": \"Bargain\",\n          \"icon\": \"iconkanjiajilu\"\n         },\n         \"children\": [{\n          \"path\": \"index\",\n          \"name\": \"BargainIndex\",\n          \"component\": \"/bargain\",\n          \"hidden\": false,\n          \"meta\": {\n           \"keepAlive\": true,\n           \"menuName\": \"Bargain\",\n           \"icon\": \"iconkanjiajilu\",\n           \"url\": \"\",\n           \"pagePermission\": []\n          }\n         }]\n        },\n    {\n        \"path\": \"/payclass\",\n        \"name\": \"Payclass\",\n        \"component\": \"Layout\",\n        \"redirect\": \"/payclass/index\",\n        \"hidden\": false,\n        \"meta\": {\n            \"menuName\": \"Payclass\",\n            \"icon\": \"iconcourse\"\n        },\n        \"children\": [{\n            \"path\": \"index\",\n            \"name\": \"PayclassIndex\",\n            \"component\": \"/payclass\",\n            \"hidden\": false,\n            \"meta\": {\n                \"keepAlive\": true,\n                \"menuName\": \"Payclass\",\n                \"icon\": \"iconcourse\",\n                \"url\": \"\",\n                \"pagePermission\": []\n            }\n        }]\n    },\n    {\n         \"path\": \"/questionnaire\",\n         \"name\": \"Questionnaire\",\n         \"component\": \"Layout\",\n         \"redirect\": \"/questionnaire/index\",\n         \"hidden\": false,\n         \"meta\": {\n          \"menuName\": \"Questionnaire\",\n          \"icon\": \"iconrenwu\"\n         },\n         \"children\": [{\n          \"path\": \"index\",\n          \"name\": \"QuestionnaireIndex\",\n          \"component\": \"/questionnaire\",\n          \"hidden\": false,\n          \"meta\": {\n           \"keepAlive\": true,\n           \"menuName\": \"Questionnaire\",\n           \"icon\": \"iconrenwu\",\n           \"url\": \"\",\n           \"pagePermission\": []\n          }\n         }]\n        },\n    {\n        \"path\":\"/account\",\n        \"name\":\"Account\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/account/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Account\",\n            \"icon\":\"\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"AccountIndex\",\n                \"component\":\"/account\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"keepAlive\":true,\n                    \"menuName\":\"AccountManage\",\n                    \"icon\":\"iconshezhi\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            },\n            {\n                \"path\":\"edit\",\n                \"name\":\"EditAccount\",\n                \"component\":\"/editAccount\",\n                \"hidden\":true,\n                \"meta\":{\n                    \"keepAlive\":false,\n                    \"menuName\":\"EditAccount\",\n                    \"icon\":\"iconshezhi\",\n                    \"url\":\"\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    },\n    {\n        \"path\":\"/site\",\n        \"name\":\"Site\",\n        \"component\":\"Layout\",\n        \"redirect\":\"/account/index\",\n        \"hidden\":false,\n        \"meta\":{\n            \"menuName\":\"Site\",\n            \"icon\":\"\"\n        },\n        \"children\":[\n            {\n                \"path\":\"index\",\n                \"name\":\"SiteBind\",\n                \"component\":\"/site\",\n                \"hidden\":false,\n                \"meta\":{\n                    \"menuName\":\"SiteBind\",\n                    \"icon\":\"iconqiu\",\n                    \"pagePermission\":[\n                    ]\n                }\n            }\n        ]\n    }\n]\n";
        $all_meta = json_decode($all_meta_json, true);
        foreach ($all_meta as $k => $v) {
            $name = $v["name"];
            switch ($name) {
                case "Article":
                    if(!$has_article) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Activity":
                    if(!$has_activity) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "House":
                    if(!$has_house) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Company":
                    if(!$has_boss) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Account":
                    if($is_we7) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Default":
                    if(!$is_we7) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Baidu":
                    if(!$has_baidu) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Closure":
                    if(!$has_closure) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Passenger":
                    if(!$has_passenger) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Cash":
                    if(!$has_redbag) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Reduction":
                    if(!$has_reduction) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Live":
                    if(!$has_livevideo) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Shortvideo":
                    if(!$has_shortvideo) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Member":
                    if(!$has_member) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Restaurant":
                    if(!$has_restaurant) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Overlord":
                    if(!$has_overlord) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Payclass":
                    if(!$has_payclass) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Bargain":
                    if(!$has_bargain) {
                        unset($all_meta[$k]);
                    }
                    break;
                case "Questionnaire":
                    if(!$has_question) {
                        unset($all_meta[$k]);
                    }
                    break;
            }
        }
        return $this->success(array_values($all_meta));
    }
}

?>